Skip to content

build: use a separate server id for central.sonatype.com - #806

Open
EmiRZx wants to merge 1 commit into
cloudevents:mainfrom
EmiRZx:central-server-id
Open

EmiRZx wants to merge 1 commit into
cloudevents:mainfrom
EmiRZx:central-server-id

Conversation

@EmiRZx

@EmiRZx EmiRZx commented Dec 6, 2026

Copy link
Copy Markdown

Fixes #781

the snapshot deploys fail since the Maven wrapper went from 3.9.16 to 3.10.1 in #775. Maven 3.10 only sends credentials to the origins it knows for a server id. for central that's https://repo.maven.apache.org. so the uploads to central.sonatype.com go out without the token and get a 401. the deploy log has a warning about it.

Not using credentials of server 'central' for repository https://central.sonatype.com: the origins declared for this id are [https://repo.maven.apache.org].

this renames the id to central-portal in the pom and the workflow. the secrets stay the same. someone who deploys by hand has to rename the server in their own settings.xml too.

I ran the deploy of the root pom against a local server with fake credentials. on main the upload has no Authorization header and fails with a 401. with this change all uploads have it and the deploy passes. I couldn't test the real repository or a release upload.

Maven 3.10 only sends the credentials of the server "central" to
repo.maven.apache.org. Snapshot uploads to central.sonatype.com went out
without them and got a 401.

Signed-off-by: emir <52245396+EmiRZx@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI issues when releasing

1 participant